using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Archiving
{
    /// <summary>
    /// <para>Trim Archive History</para>
    /// <para>Deletes retired archive records from nonversioned archive-enabled datasets.</para>
    /// <para>从启用非版本化存档的数据集中删除已停用的存档记录。</para>
    /// </summary>    
    [DisplayName("Trim Archive History")]
    public class TrimArchiveHistory : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TrimArchiveHistory()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The nonversioned archive-enabled table with the archive history to be trimmed.</para>
        /// <para>启用非版本化存档的表，其中包含要修剪的存档历史记录。</para>
        /// </param>
        /// <param name="_trim_mode">
        /// <para>Trim Mode</para>
        /// <para><xdoc>
        ///   <para>Specifies the trim mode to be used to trim the archive history.</para>
        ///   <para>At ArcGIS Pro 2.6, only the delete trim mode is available.</para>
        ///   <bulletList>
        ///     <bullet_item>Delete—The archive records will be deleted.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于修剪存档历史记录的修剪模式。</para>
        ///   <para>在 ArcGIS Pro 2.6 中，只有删除修剪模式可用。</para>
        ///   <bulletList>
        ///     <bullet_item>删除 - 将删除存档记录。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public TrimArchiveHistory(object _in_table, _trim_mode_value? _trim_mode)
        {
            this._in_table = _in_table;
            this._trim_mode = _trim_mode;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Trim Archive History";

        public override string CallName => "management.TrimArchiveHistory";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_table, _trim_mode.GetGPValue(), _trim_before_date, _out_table];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The nonversioned archive-enabled table with the archive history to be trimmed.</para>
        /// <para>启用非版本化存档的表，其中包含要修剪的存档历史记录。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Trim Mode</para>
        /// <para><xdoc>
        ///   <para>Specifies the trim mode to be used to trim the archive history.</para>
        ///   <para>At ArcGIS Pro 2.6, only the delete trim mode is available.</para>
        ///   <bulletList>
        ///     <bullet_item>Delete—The archive records will be deleted.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于修剪存档历史记录的修剪模式。</para>
        ///   <para>在 ArcGIS Pro 2.6 中，只有删除修剪模式可用。</para>
        ///   <bulletList>
        ///     <bullet_item>删除 - 将删除存档记录。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Trim Mode")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _trim_mode_value? _trim_mode { get; set; }

        public enum _trim_mode_value
        {
            /// <summary>
            /// <para>Delete</para>
            /// <para>Delete—The archive records will be deleted.</para>
            /// <para>删除 - 将删除存档记录。</para>
            /// </summary>
            [Description("Delete")]
            [GPEnumValue("DELETE")]
            _DELETE,

        }

        /// <summary>
        /// <para>Trim Before Date</para>
        /// <para>Archive records older than this date and time will be deleted. The date and time must be in UTC. If no date is provided, all archive records will be deleted.</para>
        /// <para>早于此日期和时间的存档记录将被删除。日期和时间必须采用 UTC。如果未提供日期，则将删除所有存档记录。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Trim Before Date")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _trim_before_date { get; set; } = null;


        /// <summary>
        /// <para>Output Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public TrimArchiveHistory SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}